package com.czk.stream;

import java.util.stream.Stream;

/**
 * 
 * @author LENOVO
 * skip（n）跳过前几个元素
 */
public class Stream_Skip {
	public static void main(String[] args) {
		Stream<Integer> of = Stream.of(1,2,3,4);
		//跳过前两个元素形成一个新流
		Stream<Integer> skip = of.skip(2);
		skip.forEach(System.out::println);
	}
}
